-
-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create APIResource from ApiResource for extension an APIService #1195
Conversation
Signed-off-by: suryapandian <[email protected]>
test cases are failing even tho this is trivial 🤔 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1195 +/- ##
==========================================
+ Coverage 73.42% 73.54% +0.11%
==========================================
Files 68 68
Lines 5370 5394 +24
==========================================
+ Hits 3943 3967 +24
Misses 1427 1427
|
Thanks for looking into this. However, turns out, this is actually a little harder than I first thought :( Currently, not all the information we need is currently in So together; However writing an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits. Although you won't actually be able to proceed at the moment. I have accidentally mislead you with a "good first issue". Sorry.
kube-core/src/discovery.rs
Outdated
group: Option::from(self.group), | ||
kind: self.kind, | ||
version: Option::from(self.api_version), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These first 3 are correct. Although I'd use Some(self.group)
etc.
You are missing name
which comes from self.plural
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could Some
but what if it had empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty string is a legal group name
group: Option::from(self.group), | ||
kind: self.kind, | ||
version: Option::from(self.api_version), | ||
namespaced: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to look at ApiCapabilites::scope
currently
kind: self.kind, | ||
version: Option::from(self.api_version), | ||
namespaced: true, | ||
verbs: vec!["list".to_string(), "get".to_string()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would come from ApiCapabilities::subresources
Signed-off-by: suryapandian <[email protected]>
that's okay. happens 😅 |
Motivation
Tries to address #1194
This seems too easy that I am sure this is not what you had in mind. What did you have in mind?
version
with kube-rs’sapi-version
.verbs
withvec!["list".to_string(), "get".to_string()],
feels wrong, is that okay?So, I guess it's okay
Solution